fix(driver-sql): drop vestigial sqlite3 peerDependency; SQLite uses better-sqlite3 (#3277)#3283
Merged
Merged
Conversation
feat(evaluator): route CEL-dialect component/action predicates to the canonical engine (#2664) objectui@2e7d7f0f7ee76b838f580e8a36b74f1309b204fc
…etter-sqlite3 (#3277) driver-sql declared peerDependencies.sqlite3 ^5.0.0, but nothing loads sqlite3 at runtime — every SQLite path builds a `client: 'better-sqlite3'` Knex driver (resolveSqliteDriver, the datasource driver factory, the whole test suite), and better-sqlite3 is already an optionalDependency (auto-installed, with the #2229 native→wasm→memory fallback covering a failed native build). The README already documents `pnpm add better-sqlite3`. The stale peer only misled: a consumer resolving peer deps could `pnpm add sqlite3` (never used) believing they'd satisfied the SQLite requirement. Removing it aligns the manifest with the code and docs and drops the sqlite3→node-gyp build subtree from the lockfile. The `sqlite3` string alias still maps to better-sqlite3 in the driver factory and dialect detection, so `driver: 'sqlite3'` config keeps working. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
📓 Docs Drift CheckThis PR changes 1 package(s): 8 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #3277.
Problem
packages/plugins/driver-sql/package.jsondeclaredpeerDependencies.sqlite3: "^5.0.0", but the driver never loadssqlite3at runtime. Every first-party SQLite construction site builds aclient: 'better-sqlite3'Knex driver:resolveSqliteDriverin@objectstack/service-datasource(sqlite-driver-fallback.ts) — the native → wasm → memory step-down of better-sqlite3 → wasm auto-fallback doesn't cover the persistent-file / --artifact dev path (only the zero-config :memory: branch) #2229default-datasource-driver-factory.ts(bothsqlite3andbetter-sqlite3aliases resolve to abetter-sqlite3client)driver-sqltest suitebetter-sqlite3is already anoptionalDependency(auto-installed, with the wasm/memory fallback covering a failed native build), so the SQLite requirement was already satisfied without the consumer installing anything. The README already documentspnpm add @objectstack/driver-sql better-sqlite3.Impact of the stale peer: a consumer resolving peer deps could
pnpm add sqlite3(never used) while believing they'd satisfied the SQLite requirement.Fix
sqlite3frompeerDependencies+peerDependenciesMeta.better-sqlite3stays anoptionalDependency— the intentional default-engine design (pg/mysql2/tedious remain peer-provided production opt-ins).pnpm-lock.yaml: thesqlite3 → node-gypnative-build subtree drops out (−548 lines), and packages shared withbetter-sqlite3'sprebuild-installare retained. Verified idempotent.driver-sqlis in the fixed group).No source/behavior change: the
sqlite3string alias still maps tobetter-sqlite3in the driver factory andisSqlitedialect detection, sodriver: 'sqlite3'config keeps working — it just resolves tobetter-sqlite3like everything else.Found during the #1880 docs implementation-accuracy audit (PR #3243); out of scope for that docs-only PR.
🤖 Generated with Claude Code